{{ define "admin/focus/edit.html" }}
{{ template "admin/common/page_header.html" .}}



<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <form action="/admin/focus/doEdit" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="id" value="{{.focus.Id}}"/>
                        <div class="form-group row">
                            <label class="col-sm-2 control-label" for="title">名　　称</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="title" name="title" value="{{.focus.Title}}" placeholder="请输入标题">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 control-label" for="type">类　　型</label>
                            <div class="col-sm-10">
                                <div class="form-controls">
                                    <select name="focus_type" class="form-control" id="type">
                                        <option {{if eq .focus.FocusType 1}} selected {{end}}  value="1">网站</option>
                                        <option {{if eq .focus.FocusType 2}} selected {{end}}  value="2">APP</option>
                                        <option {{if eq .focus.FocusType 3}} selected {{end}}  value="3">小程序</option>
                                    </select>
                                </div>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 control-label" for="link">跳转地址</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="link" name="link" value="{{.focus.Link}}" placeholder="请输入跳转地址">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 control-label" for="focus_img">轮播图</label>
                            <div class="col-sm-10">
                                <input type="file" name="focus_img" class="form-control"  />
                                {{if ne .focus.FocusImg ""}}
                                    <img src="{{.focus.FocusImg | FormatImg}}" width="200" />
                                {{end}}
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 control-label" for="sort">排　　序</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="sort" name="sort" value="{{.focus.Sort}}" placeholder="排序">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 control-label" for="status">状　　态</label>
                            <div class="col-sm-10">
                                <div class="clearfix">
                                    <div class="custom-control custom-radio custom-control-inline">
                                        <input type="radio" id="statusOne" name="status" class="custom-control-input" {{if eq .focus.Status 1}} checked {{end}} value="1">
                                        <label class="custom-control-label" for="statusOne">显示</label>
                                    </div>
                                    <div class="custom-control custom-radio custom-control-inline">
                                        <input type="radio" id="statusTwo" name="status" class="custom-control-input" {{if eq .focus.Status 0}} checked {{end}} value="0">
                                        <label class="custom-control-label" for="statusTwo">隐藏</label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group col-md-12">
                            <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
                            <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>


{{end}}